package org.example.domain;

import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlRootElement;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.xml.bind.annotation.XmlAttribute;

/**
 * 奇葩，类上面注解用的 jakarta-api4.0，字段属性上用的javax2.4，其他都接受不到
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
public class WxInputMessage {

    @XmlAttribute(name = "ToUserName")
    private String ToUserName;
    @XmlAttribute(name ="FromUserName")
    private String FromUserName;
    @XmlAttribute(name ="CreateTime")
    private Long CreateTime;
    @XmlAttribute(name ="MsgType")
    private String MsgType = "text";
    @XmlAttribute(name ="MsgId")
    private Long MsgId;
    // 文本消息  
    @XmlAttribute(name ="Content")
    private String Content;
    // 图片消息  
    @XmlAttribute(name ="PicUrl")
    private String PicUrl;
    // 位置消息  
    @XmlAttribute(name ="LocationX")
    private String LocationX;
    @XmlAttribute(name ="LocationY")
    private String LocationY;
    @XmlAttribute(name ="Scale")
    private Long Scale;
    @XmlAttribute(name ="Label")
    private String Label;
    // 链接消息  
    @XmlAttribute(name ="Title")
    private String Title;
    @XmlAttribute(name ="Description")
    private String Description;
    @XmlAttribute(name ="Url")
    private String URL;
    // 语音信息  
    @XmlAttribute(name ="MediaId")
    private String MediaId;
    @XmlAttribute(name ="Format")
    private String Format;
    @XmlAttribute(name ="Recognition")
    private String Recognition;
    // 事件  
    @XmlAttribute(name ="Event")
    private String Event;
    @XmlAttribute(name ="EventKey")
    private String EventKey;
    @XmlAttribute(name ="Ticket")
    private String Ticket;
}